.custom-form {
  height: 100%;

  &-container {
    background: #fafafa;
    height: 100%;

    .left-sidebar {
      width: 100%;
      padding: 0 12px;
      overflow: overlay;
      height: 100%;

      &::-webkit-scrollbar-thumb {
        border-radius: 16px;
        background-color: #e8e8e8;
      }

      .title {
        margin-top: 20px;
        display: flex;
        align-items: center;
        margin-bottom: 8px;
        font-weight: 500;
        margin-right: 6px;
        font-size: 12px;
        color: rgb(17 31 44 / 60%);
      }

      .ghost {
        opacity: 0.3;
      }

      &-draggable {
        display: flex;
        flex-wrap: wrap;
        align-items: center;

        .components-item {
          display: flex;
          align-items: center;
          width: 124px;
          height: 40px;
          margin-bottom: 12px;
          border: 1px solid transparent;
          border-radius: 8px;
          cursor: grab;
          background-color: #fff;

          &:nth-child(odd) {
            margin-right: 8px;
          }

          &:hover {
            border-color: #0089ff;
            box-shadow: 0 4px 8px 0 rgb(17 31 44 / 8%);
            color: #0089ff;
          }
        }
      }
    }

    .center-content {
      box-sizing: border-box;
      padding: 12px;
      padding-bottom: 100px;
      overflow: overlay;
      height: 100vh;

      &::-webkit-scrollbar-thumb {
        border-radius: 16px;
        background-color: #e8e8e8;
      }

      &-draggable {
        width: 100%;
      }

      .comp-ghost {
        border-top: 3px solid #0089ff;
        opacity: 0.3;
        transform: translateZ(0);
      }
    }
  }
}

.right-box {
  overflow: overlay;
  height: calc(100vh - 100px);

  &::-webkit-scrollbar-thumb {
    border-radius: 16px;
    background-color: #e8e8e8;
  }

  .rule-item {
    padding: 8px;
    position: relative;
    background: #f8f8f8;
    border-radius: 4px;
    margin-bottom: 12px;

    .rule-close {
      position: absolute;
      top: -6px;
      right: -6px;
      z-index: 10;
      cursor: pointer;

      &:hover {
        color: #f56c6c;
      }
    }

    .ant-form-item:last-child {
      margin-bottom: 0;
    }
  }
}

.drag-col {
  position: relative;
  cursor: move;

  .ant-form-item {
    padding: 12px 10px;
    border: 2px dashed #fff;
  }

  &:hover,
  &.active {
    .ant-form-item {
      background: #fff;
      border-radius: 6px;
    }

    .drag-copy,
    .drag-del {
      display: inline-flex !important;
    }
  }
}

.drag-copy,
.drag-del {
  position: absolute;
  top: -10px;
  width: 22px;
  height: 22px;
  line-height: 22px;
  text-align: center;
  border-radius: 50%;
  font-size: 12px;
  border: 1px solid;
  cursor: pointer;
  z-index: 1;
  display: none !important;
  align-items: center;
  justify-content: center;
}

.drag-copy {
  right: 56px;
  border-color: #409eff;
  color: #409eff;
  background: #fff;

  &:hover {
    background: #409eff;
    color: #fff;
  }
}

.drag-del {
  right: 24px;
  border-color: #f56c6c;
  color: #f56c6c;
  background: #fff;

  &:hover {
    background: #f56c6c;
    color: #fff;
  }
}
